﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hp.Vertica.Migration.SqlServer
{
    class SqlDataType_Decimal : SqlDataTypeWithScale
    {
        public SqlDataType_Decimal() { }
        public SqlDataType_Decimal(Int32 precision, Int32 scale) : base(precision, scale) { }


        public override string Name
        {
            get { return "DECIMAL"; }
        }

        public override int MinPrecision
        {
            get { return 0; }
        }

        public override int MaxPrecision
        {
            get { return 38; }
        }

        public override int DefaultPrecision
        {
            get { return 38; }
        }

        public override Client.Internal.VerticaDataType VerticaDataType
        {
            get { return new Client.Internal.VerticaDataType_Numeric(this.Precision, this.Scale); }
        }

        public override System.Data.SqlDbType SystemDataType
        {
            get { return System.Data.SqlDbType.Decimal; }
        }
    }
}
